-
Notifications
You must be signed in to change notification settings - Fork 90
Translate event handling page #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/v2/guide/events.md
Outdated
|
||
The logic for many event handlers will be more complex though, so keeping your JavaScript in the value of the `v-on` attribute isn't feasible. That's why `v-on` can also accept the name of a method you'd like to call. | ||
Bagaimanapun baris kode untuk banyak event handler akan terlihat rumit, jadi menempatkan kode JavaScript Anda dalam `v-on` atribut tidaklah tepat. Itulah mengapa `v-on` dapat juga menerima nama metode yang ingin dijalankan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
atribut 'v-on'
src/v2/guide/events.md
Outdated
<div id="example-2"> | ||
<!-- `greet` is the name of a method defined below --> | ||
<div id="contoh-2"> | ||
<!-- `greet` adalah nama metode yang telah didefinisikan dibawah --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dibawah => di bawah
src/v2/guide/events.md
Outdated
<!-- immediately, instead of waiting for `onScroll` to complete --> | ||
<!-- in case it contains `event.preventDefault()` --> | ||
<!-- perilaku bawaan event scroll (scrolling) akan terjadi --> | ||
<!-- seger, dari pada menunggu `onScroll` selesai --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seger => segera
src/v2/guide/events.md
Outdated
|
||
<p class="tip">Don't use `.passive` and `.prevent` together, because `.prevent` will be ignored and your browser will probably show you a warning. Remember, `.passive` communicates to the browser that you _don't_ want to prevent the event's default behavior.</p> | ||
<p class="tip">Jangan menggunakan `.passive` dan `.prevent` bersamaan, karena `.prevent` akan diabaikan dan browser anda kemungkinan akan menampilkan peringatan. Ingat, `.passive` berkomunikasi dengan broswer yang mana anda tidak ingin mencegah perilaku bawaan event.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anda => Anda
src/v2/guide/events.md
Outdated
|
||
``` html | ||
<input v-on:keyup.page-down="onPageDown"> | ||
``` | ||
|
||
In the above example, the handler will only be called if `$event.key` is equal to `'PageDown'`. | ||
Pada contoh di atas, handler hanya akan dipanggail jika `$event.key` sama dengan `'PageDown'`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dipanggail => dipanggil
src/v2/guide/events.md
Outdated
- `.esc` | ||
- `.space` | ||
- `.up` | ||
- `.down` | ||
- `.left` | ||
- `.right` | ||
|
||
<p class="tip">A few keys (`.esc` and all arrow keys) have inconsistent `key` values in IE9, so these built-in aliases should be preferred if you need to support IE9.</p> | ||
<p class="tip">beberapa kunci (.esc dan semua tombol arah) memiliki nilai key yang tidak konsisten pada peramban IE9, jadi alias yang telah tersedia di atas lebih disarankan jika anda butuh dukungan untuk peramban IE9.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huruf pertama harusnya kapital
src/v2/guide/events.md
Outdated
|
||
2. Since you don't have to manually attach event listeners in JS, your ViewModel code can be pure logic and DOM-free. This makes it easier to test. | ||
2. Sejak anda tidak membutuhkan peletakkan event listeners dalam JS secara manual, baris kode ViewModel menjadi berisi murni logika dan bebas DOM. Ini memudahkan dalam pengujian. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anda => Anda
@dikisiswanto terima kasih atas reviewnya. akan saya perbaiki kembali |
src/v2/guide/events.md
Outdated
|
||
You can use the following modifiers to trigger mouse or keyboard event listeners only when the corresponding modifier key is pressed: | ||
Anda dapat menggunakan modifier dibawah untuk memicu mouse atau keyboard event listener hanya pada saat modifier tertentu ditekan: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dibawah harusnya di bawah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beberapa bagian yang mungkin sebaiknya diperbaiki.
oke mas @andriawan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perbaiki dulu komentar-komentarnya ya mas
src/v2/guide/events.md
Outdated
|
||
The logic for many event handlers will be more complex though, so keeping your JavaScript in the value of the `v-on` attribute isn't feasible. That's why `v-on` can also accept the name of a method you'd like to call. | ||
Bagaimanapun baris kode untuk banyak event handler akan terlihat rumit, jadi menempatkan kode JavaScript Anda dalam atribut `v-on` tidaklah tepat. Itulah mengapa `v-on` dapat juga menerima nama metode yang ingin dijalankan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event handler nya pake Italic mas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logika untuk banyak event handler akan menjadikannya lebih kompleks,
src/v2/guide/events.md
Outdated
|
||
Instead of binding directly to a method name, we can also use methods in an inline JavaScript statement: | ||
Dari pada menempatkan nama metode secara langsung, kita juga dapat menggunakan metode dalam sebuah inline JavaScript statement: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaScript sebaris (inline)
src/v2/guide/events.md
Outdated
@@ -141,7 +141,7 @@ new Vue({ | |||
</script> | |||
{% endraw %} | |||
|
|||
Sometimes we also need to access the original DOM event in an inline statement handler. You can pass it into a method using the special `$event` variable: | |||
Terkadang kita juga butuh akses ke event DOM bawaan dalam inline statement handler. Anda dapat menempatkan variabel khusus `$event` ke dalam sebuah metode: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dalam handler statement sebaris
src/v2/guide/events.md
Outdated
if (event) event.preventDefault() | ||
alert(message) | ||
} | ||
} | ||
``` | ||
|
||
## Event Modifiers | ||
## Event Modifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pengubah Event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atau bisa jelaskan dengan
Pengubah (Modifier) Event
src/v2/guide/events.md
Outdated
|
||
To address this problem, Vue provides **event modifiers** for `v-on`. Recall that modifiers are directive postfixes denoted by a dot. | ||
Untuk menyelesaikan masalah ini, Vue menyediakan **event modifier** untuk `v-on`. Penggunaan modifier tersebut ialah dengan tambahan direktif diawali dengan simbol titik. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pengubah event
src/v2/guide/events.md
Outdated
<a v-on:click.stop="doThis"></a> | ||
|
||
<!-- the submit event will no longer reload the page --> | ||
<!-- the submit event tidak lagi memuat ulang halaman --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event submit
src/v2/guide/events.md
Outdated
@@ -174,115 +174,115 @@ To address this problem, Vue provides **event modifiers** for `v-on`. Recall tha | |||
- `.passive` | |||
|
|||
``` html | |||
<!-- the click event's propagation will be stopped --> | |||
<!-- click event propagation akan dihentikan --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perambatan event klik
src/v2/guide/events.md
Outdated
<!-- use capture mode when adding the event listener --> | ||
<!-- i.e. an event targeting an inner element is handled here before being handled by that element --> | ||
<!-- gunakan mode capture saat menambahkan event listener --> | ||
<!-- sebagai contoh, sebuah event menargetkan sebuah inner element ditangani disini sebelum ditangani oleh element tesebut --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
element -> elemen
src/v2/guide/events.md
Outdated
<!-- only trigger handler if event.target is the element itself --> | ||
<!-- i.e. not from a child element --> | ||
<!-- handler hanya dipicu jiks event.target adalah element itu sendiri --> | ||
<!-- sebagai contoh, tidak dari child element --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elemen anak
mas @mazipan suda saya perbaiki ulang. silahkan ditinjau kembali. untuk penggunaan kata key apakah seharusnya diterjemahkan ke kunci? |
- change word "browser" to "peramban"
src/v2/guide/events.md
Outdated
@@ -141,7 +141,7 @@ new Vue({ | |||
</script> | |||
{% endraw %} | |||
|
|||
Sometimes we also need to access the original DOM event in an inline statement handler. You can pass it into a method using the special `$event` variable: | |||
Terkadang kita juga butuh akses ke event DOM bawaan dalam statement _handler_ sebaris. Anda dapat menempatkan variabel khusus `$event` ke dalam sebuah metode: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement -> statemen, ada beberapa diatas. replaceAll aja.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
baik mas @mazipan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudah saya perbaiki mas @mazipan
- change word "browser" to peramban
No description provided.